# Maintainer: Ariadne Conill <ariadne@dereferenced.org>
pkgname=ifupdown-ng
pkgver=0.7.0
pkgrel=0
pkgdesc="tools for managing network configuration"
url="https://github.com/ifupdown-ng/ifupdown-ng"
arch="all"
license="ISC"
depends=""
checkdepends="kyua atf"
makedepends="scdoc"
install=""
subpackages="$pkgname-doc"
source="https://distfiles.dereferenced.org/ifupdown-ng/ifupdown-ng-$pkgver.tar.xz"
builddir="$srcdir/ifupdown-ng-$pkgver"

# We only install the core executors right now.  The other executors are
# still being ported to run under ifupdown-ng natively, and so we will
# use the ifupdown scripts for now for those cases.  However, it is nice
# to make the automatic dependency resolution work, and ifupdown-ng
# provides some stubs to enable that.
_executor_stubs="bridge bond vlan"

build() {
	make
	make docs
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" EXECUTOR_SCRIPTS_OPT="" EXECUTOR_SCRIPTS_STUB="$_executor_stubs" install install_docs
}

sha512sums="329460a51443e5a1aedd762e46f564a7cbdc7108ccdde571891939a526ee47961b5d6006774cd1cca31f30d35682fcf35427be50904b3d220133a9987b1cb708  ifupdown-ng-0.7.0.tar.xz"
